<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
*{
         margin: 0;
         padding: 0;
     }

     .app{
         width: 100%;
         height: 300px;
       
     }
     #app .searchbox{
         display: flex;
         /* justify-content: ; */
         justify-content: center;
         margin-top: 20px;
         margin-bottom: 15px;
     }
     #app .searchbox input{
           width: 70%;
           height: 30px;
           display: block;
           background-color: #f5f5f5;
           border-radius:10px;
           outline: none;
           border: none;
     }

     #app .searchbox span{
         color: #999;
         font-size: 20px;
         display: block;
         width: 20%;
         height: 30px;
         line-height: 30px;
           text-align: center;
     }

     .block{
         width: 100%;
       
     }
     .block .title{
         font-size: 20px;
         height: 20px;
       
         color: black;
         margin-bottom: 15px;
     }

     .block span{
         display:inline-block;
         padding: 10px;
         margin: 10px;
         margin: 10px;
         background-color: #999;
         border-radius: 10px;
     }



    </style>
</head>
<body>
    <div id="app">
        <div class="searchbox">
            <input type="text" v-model="searchText" class="kuang">
            <span @click="search">搜索</span>
        </div>
        <div class="block">
            <div class="title">历史搜索</div>
            <div>
                <span v-for="(item,index) in searchArr" :key="index">{{item}}</span>
            </div>
        </div>
    </div>
</body>
</html>
<script src="vue-2.5.21.js"></script>
<script src="作业3.js"></script>